<%--
 *  File:    ConsumerMain.jsp
 *  @Author: DC
 *  Date:    2011/09/13
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ page import="java.text.*" %>
<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>



<% //--------------------------------------  setting logger --%>
<%
  Category cat = Category.getInstance("jsp.ConsumerMain");
  //init param
  String strModuleName = "CRM";
  String privilegeCode = "10300";
  
  String contextPath = request.getContextPath();
%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>

<html>
<head>
<PageFlow:CheckPageFlow pageName="p_consumermain"/>
<%--@ include file="/inc/CatchError.inc" --%>
<%
	//params
     
  //params end
  
  HashMap zylconsumermanagementinfo = null;
  HashMap depthash = null;
  String valuezylconsumermanagementid = null;
  String dateOpt = null;
  zylconsumermanagementinfo = (HashMap)pageContext.getAttribute("zylconsumermanagementinfo");
  depthash = (HashMap)pageContext.getAttribute("depthash");
  HashMap userinfo = (HashMap)session.getAttribute("userinfo");
  
  
  
	String dateFormat = (String)session.getAttribute("dateformat");
	if(dateFormat==null)dateFormat = "yyyy-MM-dd";
  
%>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="../../css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="../../js/ScriptLib.js"></script>
<%@ include file ="/inc/NewCalendar.inc" %>


<script language="JavaScript">




function page_back()
{  
  parent.location.href = "ConsumerManagement.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode%>";
}

function page_popanamnesistype(type)
{
	var anamnesis=document.cform.anamnesis.value;
	var complication=document.cform.complication.value;
	
	var informationCollection =document.cform.informationcollection.value;
	
	//alert(symptom);
 if (type==1){
		if(anamnesis=="")anamnesis=-1;
		 var url = "../../zyl/consumer/zylanamnesispop.jsp?"+"<%= OvalTools.randomURL() %>"+"&languagecode=<%= strLanguageCode %>&type=Anamnesis"+"&zylconsumermanagementid=<custom:write name="zylconsumermanagementinfo" property="zylconsumermanagementid" />"+"&value="+anamnesis;

 }
 if (type==2){
	 if(complication=="")complication=-1;
	  var url = "../../zyl/consumer/zylanamnesispop.jsp?"+"<%= OvalTools.randomURL() %>"+"&languagecode=<%= strLanguageCode %>&type=Complication"+"&zylconsumermanagementid=<custom:write name="zylconsumermanagementinfo" property="zylconsumermanagementid" />"+"&value="+complication;
	 
 }
 if (type==3){
	 var symptom=document.cform.symptom.value;

	 if(symptom=="")symptom=-1;

	  	var url = "../../zyl/consumer/zylanamnesispop.jsp?"+"<%= OvalTools.randomURL() %>"+"&languagecode=<%= strLanguageCode %>&type=Symptom"+"&zylconsumermanagementid=<custom:write name="zylconsumermanagementinfo" property="zylconsumermanagementid" />"+"&value="+symptom;

	 
 }
 if (type==4){
	 if(informationCollection=="")informationCollection=-1;
	  	var url = "../../zyl/consumer/zylanamnesispop.jsp?"+"<%= OvalTools.randomURL() %>"+"&languagecode=<%= strLanguageCode %>&type=InformationCollection"+"&zylconsumermanagementid=<custom:write name="zylconsumermanagementinfo" property="zylconsumermanagementid" />"+"&value="+informationCollection;

 }
  var windowAttribute = "height=400, width=600,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
  
  if (typeof popwindow != 'undefined') popwindow.close();
  popwindow = window.open(url,null,windowAttribute);
 
	
}

function setContact(value,type,name){

	document.cform.anamnesis.value=value;
	System.out.println("1************************"+value);
	document.cform.anamnesisname.value=name;
}
</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td class="summary_top"></td>
  </tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
   <form name="cform" method="post" action="../../Dispatcher">
   
      <input type="hidden" name="pagename" value="p_consumermain">
      
      <input type="hidden" name="actionname">
	
      <input type="hidden" name="languagecode" value="<%= strLanguageCode %>">

      <custom:hidden name ="zylconsumermanagementinfo" property="zylconsumermanagementid" />
      
    <tr>
      <td valign="top">
        <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
            
           
           <tr>
            <td colspan="4" class="deepblue-left" height="22"> <img src="../../images/<%= strLanguageCode %>/quote.gif">
            &nbsp;</td>
          </tr>

          <tr>
			
          <td class="td-text" width="110" ><%= label.getLabelName("L_Consumer") + label.getLabelName("L_Code")+ label.getLabelName("L_Colon") %></td>
          	<td>&nbsp;<custom:write name="zylconsumermanagementinfo" property="consumercode" />

               </td>
             <td class="td-text" width="110" ><%= label.getLabelName("L_Consumer")+ label.getLabelName("L_OnceCustomerName") + label.getLabelName("L_Colon") %></td>
            <td>&nbsp;	<custom:write  name="zylconsumermanagementinfo" property="consumername"  />
           	</td>
          </tr>
         <tr>
          <td  class="td-text" width="110" ><%= label.getLabelName("L_Gender") + label.getLabelName("L_Colon") %></td>
		  <td>&nbsp;<custom:write name="zylconsumermanagementinfo"  property="gendername" /></td>
		
            <td class="td-text" width="110" ><%= label.getLabelName("L_Birthday") + label.getLabelName("L_Colon") %></td>
            
            <td>&nbsp;<custom:write property="birthday" name="zylconsumermanagementinfo" /> &nbsp;</td>

          </tr>
          <tr>

           	<td class="td-text" width="108"><%= label.getLabelName("L_IDNumber") + label.getLabelName("L_Colon") %></td>
				<td>&nbsp;<custom:write property="idcardnumber" name="zylconsumermanagementinfo" /></td>
					
            <td class="td-text" width="110" ><%= label.getLabelName("L_PostalAddress ") + label.getLabelName("L_Colon") %></td>
            <td>
                &nbsp;<custom:write name="zylconsumermanagementinfo" property="regionname" />
                &nbsp;<custom:write name="zylconsumermanagementinfo"  property="cityname" />
                &nbsp;<custom:write name="zylconsumermanagementinfo" property="countyname" />
                &nbsp;<custom:write name="zylconsumermanagementinfo" property="address" />
             </td>
             </tr>
             
             
         <tr>
         	<td class="td-text" width="108"><%= label.getLabelName("L_VipNo") + label.getLabelName("L_Colon") %></td>
			<td colspan="3" >&nbsp;<custom:write property="membercardnumber" name="zylconsumermanagementinfo" /></td>
			
         </tr>
		 <tr>
            <td  class="td-text" width="110" ><%= label.getLabelName("L_ContactMethod") + label.getLabelName("L_Colon") %></td>
           	<td><custom:write  property = "telephone" name="zylconsumermanagementinfo" /></td>
            <td class="td-text" width="110" ><%= label.getLabelName("L_Occupation") + label.getLabelName("L_Colon") %></td>
            <td>&nbsp;<custom:write  property = "jobname" name="zylconsumermanagementinfo" /></td>
          </tr>

            <tr>
            <td  class="td-text" width="110" ><%= label.getLabelName("L_Anamnesis") + label.getLabelName("L_Colon") %></td>


           	<td>
           	 <a onClick="javascript:page_popanamnesistype(1);"><custom:button type="3"
			label="L_Asterisk" imgsrc="flash.gif" border="0" /></a>&nbsp;<custom:hidden  name="zylconsumermanagementinfo" property="anamnesis"  />
			</td>
            
            <td class="td-text" width="110" ><%= label.getLabelName("L_Complication") + label.getLabelName("L_Colon") %></td>

     		<td>
           	 <a onClick="javascript:page_popanamnesistype(2);"><custom:button type="3"
			label="L_Asterisk" imgsrc="flash.gif" border="0" /></a><custom:hidden name="zylconsumermanagementinfo" property="complication" />
			</td>
          <tr>

           	<td class="td-text" width="110" ><%= label.getLabelName("L_Symptom") + label.getLabelName("L_Colon") %></td>

           	<td>
           	 <a onClick="javascript:page_popanamnesistype(3);"><custom:button type="3"
			label="L_Asterisk" imgsrc="flash.gif" border="0" /></a><custom:hidden name="zylconsumermanagementinfo" property="symptom" />
			</td>
            <td class="td-text"  width="110" ><%= label.getLabelName("L_Medication") + label.getLabelName("L_Colon") %></td>
            <td>
               &nbsp; <custom:write  name="zylconsumermanagementinfo" property="medication"   />
            </td>

          </tr>
          <tr>
          <td class="td-text"width="110" ><%= label.getLabelName("L_Employeecode") + label.getLabelName("L_Colon") %></td>
          <td >&nbsp;<custom:write name="zylconsumermanagementinfo" property="employeecode"  />
               </td>
 		  <td class="td-text"width="110" ><%= label.getLabelName("L_Responsibility") + label.getLabelName("L_Colon") %></td>
          <td >&nbsp;<custom:write  name="zylconsumermanagementinfo" property="employeename"  />
               </td>
          </tr>
		 <tr>
		 <td class="td-text"width="110" ><%= label.getLabelName("L_RegionOffice") + label.getLabelName("L_Colon") %></td>
          <td >&nbsp;<custom:write  name="zylconsumermanagementinfo" property="areaname"  />
               </td>
               
		 <td class="td-text"width="110" ><%= label.getLabelName("L_Relationship") + label.getLabelName("L_Colon") %></td>
          <td >&nbsp;<custom:write  name="zylconsumermanagementinfo" property="relationshipname"  />
               </td>
		 </tr>
		 
		 <tr>
		 <td class="td-text"width="110" ><%= label.getLabelName("L_Informationcollection") + label.getLabelName("L_Colon") %></td>
			<td>
           	 <a onClick="javascript:page_popanamnesistype(4);"><custom:button type="3"
			label="L_Asterisk" imgsrc="flash.gif" border="0" /></a><custom:hidden name="zylconsumermanagementinfo" property="informationcollection" />
			</td>
			   
           <td class="td-text"width="110" ><%= label.getLabelName("L_Isconsumeruse") + label.getLabelName("L_Colon") %></td>
          <td >&nbsp;<custom:write  name="zylconsumermanagementinfo" property="isconsumerusename"  />
               </td>
		 </tr>
		 <tr>
			<td class="td-text"width="110" ><%= label.getLabelName("L_RegionOffice") + label.getLabelName("L_Manager")+ label.getLabelName("L_Code")+ label.getLabelName("L_Colon") %></td>
          	<td >&nbsp;<custom:write name="zylconsumermanagementinfo" property="areaemployeecode"  />
               </td>
               
           <td class="td-text"width="110" ><%= label.getLabelName("L_RegionOffice")+ label.getLabelName("L_Manager")+ label.getLabelName("L_OnceCustomerName") + label.getLabelName("L_Colon") %></td>
           <td >&nbsp;<custom:write  name="zylconsumermanagementinfo" property="areaemployeename"  />
               </td>
               

		 </tr>
		 
		 <tr>
			<td class="td-text"width="110" ><%= label.getLabelName("L_Department")+ label.getLabelName("L_Colon") %></td>
          	<td >&nbsp;<custom:write  name="zylconsumermanagementinfo" property="deptdesc"  />
               </td>
               
           <td class="td-text"width="110" ><%= label.getLabelName("L_Businessdeptdesc")+ label.getLabelName("L_Colon") %></td>
           <td >&nbsp;<custom:write  name="zylconsumermanagementinfo" property="businessdeptdesc"  />
               </td>
               

		 </tr>
		 <tr>
			<td class="td-text"width="110" ><%= label.getLabelName("L_Businessdeptmanagercode")+ label.getLabelName("L_Colon") %></td>
          	<td >&nbsp;<custom:write  name="zylconsumermanagementinfo" property="area2employeecode"  />
               </td>
               
		<td class="td-text"width="110" ><%= label.getLabelName("L_Businessdeptmanagername")+ label.getLabelName("L_Colon") %></td>
          	<td >&nbsp;<custom:write  name="zylconsumermanagementinfo" property="area2employeename"  />
               </td>
		 </tr>
		 
		 <tr>
			<td class="td-text"width="110" ><%= label.getLabelName("L_Provicetdr")+ label.getLabelName("L_Colon") %></td>
          	<td >&nbsp;<custom:write  name="zylconsumermanagementinfo" property="area2name"  />
               </td>
               
		<td class="td-text"width="110" ><%= label.getLabelName("L_ProvincesManagerCode")+ label.getLabelName("L_Colon") %></td>
          	<td >&nbsp;<custom:write name="zylconsumermanagementinfo" property="area3employeecode"  />
               </td>
		 </tr>
		 
		<tr>
			<td class="td-text"width="110" ><%= label.getLabelName("L_ProvincesManagerName")+ label.getLabelName("L_Colon") %></td>
          	<td >&nbsp;<custom:write name="zylconsumermanagementinfo" property="area3employeename"/>
               </td>
               
			<td class="td-text"width="110" ><%= label.getLabelName("L_status")+ label.getLabelName("L_Colon") %></td>
          	<td >&nbsp;<custom:write  name="zylconsumermanagementinfo" property="statusname"  />
               </td>
		 </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td class="summary_top"></td>
    </tr>
    <tr>
    <td height="49" class="td_center">
       
        <a onclick="javascript:page_back()"><custom:button type="1" label="L_Back" imgsrc="back.gif" border="0" style="width:60"/></a>


    </td>
    </tr>
</form>
</table>
<script language="JavaScript" src="../../js/Calendar.js" ></script>
<%@include file="/inc/AlertError.inc"%>
</body>
</html>


           		